package com.artisan.common.enums;

/**
 * Created by szw on 2017/7/26.
 */
public enum OrderStateEnum2 {

	WAITING_PAY(1,"待付款", "待付款", ""),
	WAITING_ORDER(2, "待接单", "已付款，待接单", "待接单"),
	ALREADY_ORDER(3, "师傅已接单", "已接单，待上门", "待上门"),
	IN_SERVICE(4, "师傅服务中", "服务中", "服务中"),
	WAIT_CONFIRM(5, "师傅已确认完成服务", "师傅已确认", "等待用户确认"),
	FINISHED(6, "服务已完成", "服务已完成，待结算", "待结算"),
	IN_AUDIT(7, "退款审核中", "用户取消订单，待审核", ""),
	IN_REFUND(8, "退款中", "退款中", ""),
	REFUNDED(9, "已退款", "已退款", ""),
	CLOSE(10, "", "已结算" ,"已结算");

	private final Integer value;

	private final String cState;

	private final String aState;

	private final String wState;

	/**
	 * 私有构造函数
	 * @param value
	 * @param cState
	 * @param aState
	 * @param wState
	 */
	private OrderStateEnum2(Integer value, String cState, String aState, String wState) {
		this.value = value;
		this.cState = cState;
		this.aState = aState;
		this.wState = wState;
	}

	public Integer getValue() {
		return value;
	}

	public String getcState() {
		return cState;
	}

	public String getaState() {
		return aState;
	}

	public String getwState() {
		return wState;
	}

	/**
	 * 通过枚举<code>value</code>获得枚举
	 *
	 * @param value
	 * @return
	 */
	public static OrderStateEnum2 getByValue(String value) {
		for (OrderStateEnum2 channelType : values()) {
			if (channelType.getValue().toString().equals(value)) {
				return channelType;
			}
		}
		return null;
	}
}
